<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type');
            $table->integer('lv');
            $table->string('openID')->nullable();
            $table->string('name');
            $table->string('realName')->nullable();
            $table->string('thumb')->nullable();
            $table->string('email');
            $table->char('phone', 32)->nullable();
            $table->tinyInteger('verify')->unsigned();
            $table->timestamp('verifyTime')->default(\Illuminate\Support\Facades\DB::raw('CURRENT_TIMESTAMP'));
            $table->smallInteger('groupID');
            $table->string('password', 60);
            $table->rememberToken();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('users');
    }
}
